package com.dt76.smallloanbackenduser.controller.xiaohao;

import com.dt76.smallloanbackenduser.pojo.xiaohao.YBankAccount;
import com.dt76.smallloanbackenduser.remote.xiaohao.BankAccountRemote;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

@Controller
public class BankAccountController {

    @Resource
    private BankAccountRemote bankAccountRemote;

    @RequestMapping("/yBankAccount/query")
    @ResponseBody
    public Map<String,Object> qryById(String id){
        Map<String,Object> map = new HashMap<>();
        YBankAccount yBankAccount = bankAccountRemote.qryById(Integer.parseInt(id));
        System.out.println(yBankAccount.toString());
        map.put("yBankAccount",yBankAccount);
        return map;
    }
}
